package com.cn.kehong.controller;

import com.cn.kehong.api.IProductThickPeriodService;
import com.cn.kehong.api.IProductThinPeriodService;
import com.cn.kehong.domain.ProductThickPeriod;
import com.cn.kehong.domain.ProductThinPeriod;
import com.cn.kehong.utils.JsonResponse;
import com.cn.kehong.utils.QueryForm;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/thick")
public class ProductThickPeriodController {

    @Autowired
    private IProductThickPeriodService productThickPeriodService;


    @RequestMapping("/getProductThickPeriodList/{frontToken}")
    @ResponseBody
    public JsonResponse<List<ProductThickPeriod>> getProductThickPeriodList(QueryForm queryForm, @PathVariable(value = "frontToken",required = true) String frontToken) throws Exception {
        JsonResponse<List<ProductThickPeriod> > response = new JsonResponse<List<ProductThickPeriod> >();
        List<ProductThickPeriod> lists = productThickPeriodService.getProductThickPeriodList(queryForm);
        response.setResult(lists);
        response.setSuccess(true);
        return  response;
    }



}
